$__AUI_PAGINATION_SELECTOR: ".#{$aui-ns}-pagination";

$aui-pagination-active-color: #ffffff;
$aui-pagination-active-bg: $aui-brand-info;

@mixin aui-pagination-mixin-pagination-item() {
    font-size: 12px;
    margin-left: 10px;
    @content;
}

@mixin aui-pagination-mixin-pagination() {
  &__body {
    padding-left: 0; 
    list-style: none;
  }

  &__item {
    display: inline-block;

    > a {
        @include aui-pagination-mixin-pagination-item() {
            padding: 5px 10px;   
            color: $aui-brand-info;
            &:hover {                
                color: #ffffff;
                background-color: $aui-brand-info;
            }
        }
    }

    > span {
        @include aui-pagination-mixin-pagination-item() {
            padding: 5px;
        }
    }

    &:first-child > span {
        margin-left: 0;
    }

    &:first-child > a {
        margin-left: 0;
    }

    &.active > a {
        z-index: 2;
        color: $aui-pagination-active-color;
        background-color: $aui-pagination-active-bg;
    }

    &.disabled > span {
        color: $aui-brand-gray;
        background-color: transparent;
    }

    &.disabled > a {
        color: $aui-brand-gray;
        pointer-events: none;
        background-color: transparent;
    }
  }
}

/// use to create a .pagination-control class
@mixin aui-pagination-create-pagination($selector: $__AUI_PAGINATION_SELECTOR) {
    #{$selector} {
       @include aui-pagination-mixin-pagination();
    }
}

@mixin aui-pagination-use-pagination-selector() {
    #{$__AUI_PAGINATION_SELECTOR} {
        @content;
    }
}